import request from '@/utils/request'

// 获取-部门列表 /company/department
export const getCompanyRequest = () => {
  return request.get('/company/department')
}
// 获取-部门负责人列表 /sys/user/simple
export const getSysUserRequest = () => {
  return request.get('/sys/user/simple')
}

// 新增-部门 /company/department 注意:这里需要传递5个值 但是我们只有4个值 需要从父组件中调用一个值给子组件使用
export const postCompanyRequest = (data) => {
  return request.post('/company/department', data)
}

// 删除-部门详情 /company/department/{id}
export const deleteCompanyRequest = (id) => {
  return request.delete(`/company/department/${id}`)
}

// 获取-部门详情 /company/department/{id}
export const getCompanyDepartmentRequest = (id) => {
  return request.get(`/company/department/${id}`)
}
// 修改-部门详情 /company/department/{id}
export const putCompanyDepartmentRequest = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}
